package cn.jiyun.controller;

import cn.jiyun.pojo.YouHui;
import cn.jiyun.service.YouHuiService;
import cn.jiyun.vo.ResultCommon;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("youhui")
@CrossOrigin
public class YouHuiController {

    @Autowired
    private YouHuiService youHuiService;

    @RequestMapping("findAll")
    public ResultCommon findAll(){
        List<YouHui> youHuiList = youHuiService.findAll();
        return ResultCommon.suceessData(youHuiList);
    }


}
